package com.example.demo.service.impl;

import com.example.demo.mapper.UMapper;
import com.example.demo.mapper.UserMapper;
import com.example.demo.pojo.SelectWeb;
import com.example.demo.pojo.User;
import com.example.demo.pojo.Web;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public User login(User user) {
        return userMapper.getUser(user);
    }

    @Override
    public void AddUser(User user) {
        userMapper.AddUser(user);
    }

    @Override
    public void userUpd(User user) {
        userMapper.userUpd(user);

    }

    @Override
    public List<Web> allWeb() {
        return userMapper.allWeb();
    }

    @Override
    public void addWeb(Web web) {
        userMapper.addWeb(web);
    }

    @Override
    public List<Web> selectWeb(SelectWeb selectWeb) {
        return userMapper.selectWeb(selectWeb);
    }

    @Override
    public Web findWeb(Web web) {
        return userMapper.findWeb(web);
    }
}
